﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;


//Class to specify location and import of OCR.dll.

namespace OCRGUI2008
{
    class DLLImport
    {
       
            //Imports the GetOCRResult function.  Main function to ocr and translate Pharmacode.
        [DllImport("OCRDLL.dll")]
        unsafe public static extern int GetOcrResult(String filename, String filePath, int left, int top, int right, int bottom, int contentFlag, StringBuilder ResultBuffer, int bufferSize);

        //   Imports LoadKernel.  Function is used to setup the OCR variable.
        [DllImport("OCRDLL.dll")]
            public static extern int LoadKernel(String datapath, String lang);

        //Imports the FreeKernel.  Used to delete open instances created by LoadKernel of the OCR.
        [DllImport("OCRDLL.dll")]
        public static extern void FreeKernel();

        //Imports the UTF8toChinese from UTF8ToChinese.dll.  This dll was added to convert UTF8 to Chinese.  This is a seperate dll from the OCRDLL.dll

        [DllImport("UTF8ToChinese.dll")]
        unsafe public static extern void UTF8toChinese(byte[] ChineseResult);

       }
}
